﻿@using TjZheng.Logger.DataEntity;
@inherits CMSWebViewPage<LogType>
@{
    ViewBag.Title = "日志类型编辑页";
    Layout = "~/Views/Shared/_EditLayout.cshtml";
}
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false">
        <div class="top-block">
            @CurrentButtonTool.Create()
        </div>
        <form id="fr_logtype" method="post">
            @*@Html.AntiForgeryToken()*@
            <table class="tblContent">
                <colgroup>
                    <col class="colTitle">
                    <col class="colContent" />
                </colgroup>
                <tr>
                    <td><span class="txtNoNull">*</span>类型名称:</td>
                    <td>
                        @Html.Hidden("objProvide.Id", Model.Id, false)
                        @Html.StringBox("objProvide.TypeName", Model.TypeName, true, "请输入类型名称", ValidType.Length(64))
                    </td>
                </tr>
                <tr>
                    <td><span class="txtNoNull">*</span>类型代码:</td>
                    <td>
                        @Html.StringBox("objProvide.TypeCode", Model.TypeCode, true, "请输入类型代码", null, ValidType.Length(64))
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
@section Bottom{
    @*<script src="~/Content/easyui/jquery.min.js"></script>*@
    @*<script src="~/Content/js/tjzheng.js"></script>*@
    <script type="text/javascript">
        function Save() {
            var objFormEntity = new FormEntity("#fr_logtype");
            objFormEntity.url = "/logtype/save/";
            objFormEntity.submiting = function () {
                return $(objFormEntity.selector).form('validate');
            };
            objFormEntity.submitSuccess = function (InvokeResult) {
                if (InvokeResult.ResultCode == "Success") {
                    ShowMessage(InvokeResult.ResultMessage);
                    Back();
                } else {
                    ShowMessage(InvokeResult.ResultMessage);
                }
            };
            objFormEntity.isClearData = false;
            objFormEntity.submit();
        }
        function Back() {
            window.location.href = "/logtype";
        }
    </script>
}
